package com.expressage.service.impl;

import com.expressage.dao.SalaryDao;
import com.expressage.po.Salary;
import com.expressage.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Array;
import java.util.List;
@Service
public class SalaryServiceImpl implements SalaryService {


    @Autowired
    SalaryDao salaryDao;



    @Override
    public List<Salary> findAll() {
        return salaryDao.findAll();
    }

    @Override
    public Salary findByid(int salaryid) {
        return salaryDao.findByid(salaryid);
    }

    @Override
    public boolean delete(int[] array) {
        return salaryDao.delete(array)>0?true:false;
    }

    @Override
    public boolean add(Salary salary) {
        return salaryDao.add(salary)>0?true:false;
    }

    @Override
    public boolean update(Salary salary) {
        return salaryDao.update(salary)>0?true:false;
    }
}
